<!DOCTYPE html>
<html class="x-admin-sm">

<head>
    <meta charset="UTF-8">
    <title>退款</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
        content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="stylesheet" href="../../css/font.css">
    <link rel="stylesheet" href="../../css/xadmin.css">
    <script type="text/javascript" src="../../lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="../../js/xadmin.js"></script>
    <script src="../../js/base.js"></script>
    <script src="../../js/jquery.min.js"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>

<body>
    <div class="layui-fluid">
        <div class="layui-row">
            <form class="layui-form">
                <div class="layui-form-item">
                    <label for="orderNum" class="layui-form-label">
                        <span class="x-red">*</span>订单号
                    </label>
                    <div class="layui-input-inline">
                        <input type="text" 
                                id="orderNum" name="orderNum" 
                                required=""  disabled
                                 autocomplete="off"
                            class="layui-input">
                        
                    </div>
                </div>
                <div class="layui-form-item">
                    <label for="paymentType" class="layui-form-label">
                        <span class="x-red">*</span>支付方式
                    </label>
                    <div class="layui-input-inline">
                        <input type="text" 
                                id="paymentType" name="paymentType" 
                                required=""  disabled
                                 autocomplete="off"
                            class="layui-input">
                        
                    </div>
                </div>
                <div class="layui-form-item">
                    <label for="name" class="layui-form-label">
                        <span class="x-red">*</span>支付人
                    </label>
                    <div class="layui-input-inline">
                        <input type="text" 
                                id="name" name="name" 
                                required=""  disabled
                                 autocomplete="off"
                            class="layui-input">
                        
                    </div>
                </div>
                <div class="layui-form-item">
                    <label for="payTime" class="layui-form-label">
                        <span class="x-red">*</span>支付时间
                    </label>
                    <div class="layui-input-inline">
                        <input type="text" 
                                id="payTime" name="payTime" 
                                required=""  disabled
                                 autocomplete="off"
                            class="layui-input">
                        
                    </div>
                </div>
                <div class="layui-form-item">
                    <label for="price" class="layui-form-label">
                        <span class="x-red">*</span>支付金额
                    </label>
                    <div class="layui-input-inline">
                        <input type="text" 
                                id="price" name="price" 
                                required=""  disabled
                                 autocomplete="off"
                            class="layui-input">
                        
                    </div>
                </div>
                <div class="layui-form-item">
                    <label for="payType" class="layui-form-label">
                        <span class="x-red">*</span>用途
                    </label>
                    <div class="layui-input-inline">
                        <input type="text" 
                                id="payType" name="payType" 
                                required=""  disabled
                                 autocomplete="off"
                            class="layui-input">
                        
                    </div>
                </div>
                <div class="layui-form-item">
                    <label for="paymentStatus" class="layui-form-label">
                        <span class="x-red">*</span>订单状态
                    </label>
                    <div class="layui-input-inline">
                        <input type="text" 
                                id="paymentStatus" name="paymentStatus" 
                                required=""  disabled
                                 autocomplete="off"
                            class="layui-input">
                        
                    </div>
                </div>
                <div class="layui-form-item">
                    <label for="payType2" class="layui-form-label">
                        <span class="x-red">*</span>退款方式
                    </label>
                    <div class="layui-input-inline">
                        <input type="text" 
                                id="payType2" name="payType2" 
                                required=""  disabled
                                 autocomplete="off"
                            class="layui-input">
                        
                    </div>
                </div>
                <div class="layui-form-item">
                    <label for="price2" class="layui-form-label">
                        <span class="x-red">*</span>退款金额
                    </label>
                    <div class="layui-input-inline">
                        <input type="text" 
                                id="price2" name="price2" 
                                required=""  disabled
                                 autocomplete="off"
                            class="layui-input">
                        
                    </div>
                </div>
                <div class="layui-form-item">
                    <label for="refundTime" class="layui-form-label">
                        <span class="x-red">*</span>退款时间
                    </label>
                    <div class="layui-input-inline">
                        <input type="text" 
                                id="refundTime" name="refundTime" 
                                required=""  disabled
                                 autocomplete="off"
                            class="layui-input">
                        
                    </div>
                </div>
                <div class="layui-form-item">
                    <label for="refundAdminName" class="layui-form-label">
                        <span class="x-red">*</span>操作人
                    </label>
                    <div class="layui-input-inline">
                        <input type="text" 
                                id="refundAdminName" name="refundAdminName" 
                                required=""  disabled
                                 autocomplete="off"
                            class="layui-input">
                    </div>
                </div>
                <!--  -->
                <div class="layui-form-item" style="display: none;">
                    <label for="dataId" class="layui-form-label">
                        <span class="x-red">*</span>当前信息id
                    </label>
                    <div class="layui-input-inline">
                        <input type="text" 
                                id="dataId" name="dataId" 
                                required=""  disabled
                                 autocomplete="off"
                            class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item" style="display: none;">
                    <label for="Showwat" class="layui-form-label">
                        <span class="x-red">*</span>当前操作
                    </label>
                    <div class="layui-input-inline">
                        <input type="text" 
                                id="Showwat" name="Showwat" 
                                required=""  disabled
                                 autocomplete="off"
                            class="layui-input">
                    </div>
                </div>
                <div class="layui-form-item" style="text-align: center">
                    <button type="submit" 
                            lay-filter="add" lay-submit="" 
                            class="layui-btn" id="testListAction">确定
                    </button>
                    <button type="button" 
                            class="layui-btn layui-btn-primary" 
                            onclick="xadmin.close()">取消</button>
                </div>
            </form>
        </div>
        
    </div>
    <script>
        layui.use(['form', 'layer'],
            function () {
                $ = layui.jquery;
                var form = layui.form,
                    layer = layui.layer;
                var flag = false;

                //监听提交
                form.on('submit(add)',
                    function (data) {
                        // if ($("#title").val() == "" || $("#type").val() == "" || $(
                        //         "#content").val() == "" || $("#videoUrl").attr("src") == "" || $(
                        //         'input[name="isHomeDisplay"]:checked').val() == undefined) {
                        //     layer.alert("必填项不能为空", {
                        //         title: "提示"
                        //     })
                        //     return false
                        // }
                        console.log(data,'提交')
                        if($("#Showwat").val() == '查看'){
                            xadmin.close()
                            return
                        }else{
                            // alert(1111)
                            event.preventDefault();
                            
                            layer.confirm('确定给当前用户退款？', function (index) { //点击确定后，才执行下面语句
                                $.ajax({
                                    type: "get",
                                    url: LL_refund,
                                    data: {
                                        orderId: $('#dataId').val()
                                    },
                                    success: function (res) {
                                        // console.log(res,"2da42da2ad12ad42da4")
                                        if (res.msg == 0) {
                                            //删除成功
                                            layer.alert("操作成功")
                                            // console.log(index, data);//获取行信息
                                            // obj.del(); //删除对应行（tr）的DOM结构
                                            setTimeout(function(){
                                                xadmin.close()
                                                xadmin.father_reload();
                                            },1000)
                                            
                                            // table.reload('testReload', {
                                            //     page: {
                                            //         curr: 1 //重新从第 1 页开始
                                            //     }
                                            // }, 'data');
                                        } else {
                                            layer.msg(res.msg)
                                        }
                                    }
                                })
                                //向服务端发送删除指令
                            });
                        }
                        return false;
                    });

            });
    </script>
</body>

</html>